<template>
	<view>
		<view class="bb pb10"   @click="examine(item)" v-for="(item,index) in list" :key="index">
			<view class="w95 f b">
				<view>
					<image style="width: 160rpx;height: 160rpx;border-radius: 200rpx;" :src="item.img" mode="aspectFit"></image>
				</view>
				<view class="vw65 f d ml15">
					<text class="fs28 bold">{{item.name}}</text>
					<text class="fs20 hui p_t_20">{{item.content ? item.content :'无简介'}}</text>
					<view class="information-but">
						<button type="default">查看</button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad(e) {
			this.list = JSON.parse(decodeURIComponent(e.data));
			console.log(this.list)
		},
		methods: {
			examine(item) {
				var data = encodeURIComponent(JSON.stringify(item))
				uni.navigateTo({
					url: "../../courses/details/details?data="+ data
				})
			},
		}
	}
</script>

<style scoped>
	.information-but {
		margin-left: 330rpx;
		margin-top:20rpx;
	}
	
	.information-but>button {
		width: 128rpx;
		height: 40rpx;
		line-height: 40rpx;
		font-size: 24rpx;
		opacity: 1;
		background: #1f73f2;
		border-radius: 20rpx;
		color: #fff;
	}
</style>
